<script language="javascript">
    window.returnValue = true;
    try {
        opener.thisOpener();
    } catch(e) {

    }
    window.close();
</script>